package com.dragon.repository.mapper;

import com.dragon.repository.entity.Version;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 版本信息 Mapper 接口
 * </p>
 *
 * @author sy
 * @since 2024-01-17
 */
@Mapper
public interface VersionMapper extends BaseMapper<Version> {

    /**
     * 获取最新的一条版本信息
     * @return
     */
    @Select("SELECT * FROM dragon_version a where a.status = 1 ORDER BY a.create_time DESC LIMIT 1")
    Version selectLatestOne();
}
